package com.itheima.app;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * ClassName: App1
 * Description:
 * Date: 2023/03/22 PM 7:27:33
 * <p>
 * project: springboot
 * package: com.itheima.app
 * email: 1085844536@qq.com
 * version:
 *
 * @author WangGuojian
 */
public class App1 {
    public static void main(String[] args) {
        ApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext1.xml");
        // Object cat = ctx.getBean("cat");
        // System.out.println(cat);
        // Dog dog = ctx.getBean(Dog.class);
        // System.out.println(dog);
        String[] names = ctx.getBeanDefinitionNames();
        for (String name : names) {
            System.out.println(name);
        }
    }
}
